package com.ruoyi.product.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 供应商产品对象 supplier_product
 * 用于管理供应商提供的药品信息，包括价格、库存和供应状态
 * 
 * @author ruoyi
 * @date 2025-04-12
 */
public class SupplierProduct extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @Excel(name = "主键id")
    private Long id;

    /** 供货商id */
    @Excel(name = "供货商id")
    private Long supplierId;

    /** 药品id */
    @Excel(name = "药品id")
    private Long medicationId;

    /** 药品编号 */
    @Excel(name = "药品编号")
    private String productCode;

    /** 单价 */
    @Excel(name = "单价")
    private BigDecimal price;

    /** 供应商库存 */
    @Excel(name = "供应商库存")
    private Long quantity;

    /** 药品状态，1 供应中，2 停止 */
    @Excel(name = "药品状态", readConverterExp = "1=供应中,2=停止")
    private String status;

    /** 过期日期 */
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private int expirationDate;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setMedicationId(Long medicationId) {
        this.medicationId = medicationId;
    }

    public Long getMedicationId() {
        return medicationId;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setExpirationDate(int expirationDate) {
        this.expirationDate = expirationDate;
    }

    public int getExpirationDate() {
        return expirationDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("supplierId", getSupplierId())
                .append("medicationId", getMedicationId())
                .append("productCode", getProductCode())
                .append("price", getPrice())
                .append("quantity", getQuantity())
                .append("status", getStatus())
                .append("expirationDate", getExpirationDate())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
